﻿using System;
using System.Collections;
using System.Collections.Generic;

namespace WSPay.Common.Data
{
    public interface IUnitOfWork:IDisposable
    {
        int Commit();

        void Detach<T>(T t) where T : WSPay.Common.Data.IEntity;

        IRepository<T> Repository<T>() where T:IEntity;

        int ExecuteSql(string sql, params object[] parameters);

        IEnumerable<T> QuerySql<T>(Type elementType, string sql, params object[] parameters);  
    }
}
